package com.xcc.factorypattern.demo03;

/**
 * @Description: NYStylePizzaStore
 * @Author xiechuang
 * @Date 2022/9/3
 */
public class NYPizzaStore extends PizzaStore{

    @Override
    Pizza createPizza(String item) {
        if ("cheese".equals(item)) {
            return new NYStyleCheesePizza();
        } else if ("pepperoni".equals(item)) {
            return new NYStylePepperoniPizza();
        } else if ("clam".equals(item)) {
            return new NYStyleClamPizza();
        } else if ("veggie".equals(item)){
            return new NYStyleVeggiePizza();
        }
        return null;
    }

}
